Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Media Item Menu - Identify Media Item #1369

Merged
merged 20 commits into from
Dec 31, 2024

Conversation

JPKribs
Copy link
Member

@JPKribs JPKribs commented Dec 18, 2024

Summary

Creates an 'Identify' View to allow users to identify an item against Jellyfin Server's remote sources. This searches and matches for an item based on the Title, Original Title or Year. See the video for more detail!

Video

Fixing a mismatch where Jellyfin thought Star Wars was Phineas & Ferb: Star Wars. This video is correcting that match back to `Star Wars'.

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-29.at.03.08.31.mp4

@JPKribs
Copy link
Member Author

JPKribs commented Dec 20, 2024

I think this is ready to go! There are three items that could be controversial:

  1. The Selection Modal that pops up in the Identify View is a .sheet. I can change this to a full Stinsen > Router but I thought this was easier solution opposed to passing the viewModel between views. I'd be happy to move that over but I felt the sheet made sense on my end so I would go into the review with my current route.

  2. I am only searching on selection of the Search button. Since this is pinging the server each time and the server is pinging providers, I was worried there might be a rate limiting concern if you have a long search string and this performs the search with each new letter. Pinging just Jellyfin, I don't see a problem automatically searching but I'd rather not cause issues with providers and potentially getting someone rate limited.

  3. I standardized the Cancel button from the VideoPlayerView. I hope this is the route we want this to look for other instances of this type of loading/cancelling:

Screenshot 2024-12-29 at 02 39 38

Other than that, I believe this is ready to go! Please let me know if there are any changes or feedback that should be taken into account!

@JPKribs JPKribs marked this pull request as ready for review December 20, 2024 04:54
@JPKribs JPKribs changed the title [WIP] [iOS] Media Item Menu - Identify Media Item [iOS] Media Item Menu - Identify Media Item Dec 20, 2024
@JPKribs JPKribs requested a review from LePips December 29, 2024 08:46
Copy link
Member

@LePips LePips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for not responding earlier for some feedback. Instead of just commenting and waiting I've just updated with some of my changes, most notably by renaming and some redesign using other existing views.

Per the implementation of a unified cancel view like the video player, that view and flow is changed in my work in #1203. Something like that should be in DelayedProgressView, but even then that view probably isn't the best here.

There are many changes that this flow should receive though:

  • Change poster styling depending on media type. This will be more important when music is implemented.
  • ItemView and all subsidiary views are way old, before I knew what I know now about about proper ways to update views in SwiftUI. They will need some refactoring to handle item updates, which is why I changed a bit in ItemView.AboutView to accommodate item updating but even that should be changed.
  • We need to figure out cache invalidation for the previous item images.

What's here is good for now!

@LePips LePips merged commit 486995b into jellyfin:main Dec 31, 2024
4 checks passed
@JPKribs
Copy link
Member Author

JPKribs commented Dec 31, 2024

Apologies for not responding earlier for some feedback. Instead of just commenting and waiting I've just updated with some of my changes, most notably by renaming and some redesign using other existing views.

Per the implementation of a unified cancel view like the video player, that view and flow is changed in my work in #1203. Something like that should be in DelayedProgressView, but even then that view probably isn't the best here.

There are many changes that this flow should receive though:

* Change poster styling depending on media type. This will be more important when music is implemented.

* `ItemView` and all subsidiary views are way old, before I knew what I know now about about proper ways to update views in SwiftUI. They will need some refactoring to handle item updates, which is why I changed a bit in `ItemView.AboutView` to accommodate item updating but even that should be changed.

* We need to figure out cache invalidation for the previous item images.

What's here is good for now!

This looks great! Thank you again for helping get this over the finish line. These changes all make sense and I'm very happy with the result!

@JPKribs JPKribs deleted the editItemIdentify branch December 31, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants